<?php
//var_dump($applicants);
?>

<?echo $system_message;?>
<table class="table table-hover">
	<thead>
		<tr>
			<th style="text-align:center;vertical-align:text-top;">Applicant Name</th>
			<th style="text-align:center;vertical-align:text-top;">Applying for Grade Level</th>
			<th style="text-align:center;vertical-align:text-top;">Examination Date</th>
			<th style="text-align:center;vertical-align:text-top;">Last School Attended</th>
			<th style="text-align:center;vertical-align:text-top;">School Records</th>
			<th style="text-align:center;vertical-align:text-top;">Status</th>
			<th style="text-align:center;vertical-align:text-top;">Recommendation</th>
			<th style="text-align:center;vertical-align:text-top;">Approved By Guidance</th>
		</tr>
	</thead>
	<tbody>
		<?if(!empty($applicants)):?>
			<?foreach($applicants as $k=>$v):?>
			<tr>
				<td class="center" style="font-style:capitalize;"><?php echo ucwords(strtolower($v->firstname)); echo $v->middlename!=NULL?' '.ucwords(strtolower($v->middlename)):''; echo ' '.ucwords(strtolower($v->lastname));?> <?php if($v->name_ext!=''){ echo $v->name_ext=='jr' || $v->name_ext=='jr.' || $v->name_ext == 'sr' || $v->name_ext == 'sr.' ? ucwords(strtolower($v->name_ext)):strtoupper($v->name_ext); }else{ echo ''; } ?></td>
				<td class="center" ><?=$v->level_desc;?></td>
				<td class="center" ><?=$v->schedule_for_testing;?></td>
				<td class="center" ><?=$v->previous_school;?></td>
				<td class="center" ><?=$v->guidance_school_records;?></td>
				<td class="center" style="font-style:capitalize;"><?=$v->guidance_status;?></td>
				<td class="center" style="font-style:capitalize;"><?=$v->guidance_recommendation;?></td>
				<td class="center" ><?=$v->guidance_approved == 1 ? 'Yes' : 'Not Yet';?></td>
			</tr>
			<?endforeach;?>
		<?else:?>
			<tr>
				<td colspan="7" class="center">No Applicant To Display</td>
			</tr>
		<?endif;?>
	</tbody>
</table>